<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style style="text/css">
        #box1 .box2 .demo,.box1 .box2 #box3 .demo{
            color: red;
        }
        .box1 #box2 #ps{
            color: blue;
        }
    </style>
</head>
<body>
    <!-- <p class="demo" id="ps">层叠优先级</p> -->

    <div class="box1" id="box1">
        <div class="box2" id="box2">
            <div class="box3" id="box3">
                <p class="demo" id="ps">abc</p>
            </div>
        </div>
    </div>

    <input type="hidden" name="a">

    <input type="radio" name="sex" checked="checked" id="nan">
    <label for="nan">男</label>

    <label for="nv"><input type="radio" name="sex" id="nv"> 女</label>
</body>
</html>